/**
 * Copyright (c) 2019 xstgongyi.org
 * All rights reserved.
 */
package org.xstgongyi.eduaid.controller;

import org.xstgongyi.eduaid.dataobject.SponsorDO;

/**
 * @author oldcrane<br/>
 * @created 2019-04-18
 */
class SponsorControllerHelper {

	static SponsorDO merge(SponsorDO dbObj, SponsorDO inputObj) {
		SponsorDO result = (SponsorDO) VolunteerControllerHelper.mergeInputToDbObj(dbObj, inputObj);

		result.setType(null != inputObj.getType() ? inputObj.getType() : dbObj.getType());
		result.setWaitPair(null != inputObj.getWaitPair() ? inputObj.getWaitPair() : dbObj.getWaitPair());
		result.setWantVisit(null != inputObj.getWantVisit() ? inputObj.getWantVisit() : dbObj.getWantVisit());

		return result;
	}
}
